package com.ereport.entity;

import java.io.Serializable;
import java.util.Date;
import java.util.HashSet;
import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;

@Entity
@Table(name = "accounts")
public class Accounts implements Serializable{

	@Id
	@GeneratedValue(generator="increment")
	@GenericGenerator(name="increment", strategy = "increment")
	private int id;
	@ManyToOne
	@JoinColumn(name="exe_id")
	private Executives exeId;
	private String accName;
	private String accNumber;
	@Column(name="industry_type")
	private String industryType;
	@Column(name="invoice_address")
	private String invoiceAddr;
	@Column(name="primary_acc_owner_name")
	private String primaryAccOwnrName;
	private String phone;
	private String fax;
	private String website;
	private String email;
	private String shippingAddress;
	private String taxRegrNumber;
	private Date accCreatedDate;
	
	
	@OneToMany(cascade = CascadeType.ALL)
	@JoinColumn(name = "acc_id", referencedColumnName = "id")
	private Set<AccContacts> accContact = new HashSet<AccContacts>();
	
	public Set<AccContacts> getAccContact() {
		return accContact;
	}

	public void setAccContact(Set<AccContacts> accContact) {
		this.accContact = accContact;
	}

	public Accounts(){
		
	}

	public Accounts(int acid, Executives ex, String org, String acNum,
			String indsType, String prAccOwnName, String phn, String fax2,
			String email2, String website2, String shpAddr, String invAddr,
			String taxRegdNum, Date d) {
		this.id=acid;
		this.exeId=ex;
		this.accName=org;
		this.accNumber=acNum;
		this.industryType=indsType;
		this.primaryAccOwnrName=prAccOwnName;
		this.phone=phn;
		this.fax=fax2;
		this.email=email2;
		this.website=website2;
		this.shippingAddress=shpAddr;
		this.invoiceAddr=invAddr;
		this.taxRegrNumber=taxRegdNum;
		this.accCreatedDate=d;
	}
	public Accounts( Executives ex, String org, String acNum,
			String indsType, String prAccOwnName, String phn, String fax2,
			String email2, String website2, String shpAddr, String invAddr,
			String taxRegdNum, Date d) {
		this.exeId=ex;
		this.accName=org;
		this.accNumber=acNum;
		this.industryType=indsType;
		this.primaryAccOwnrName=prAccOwnName;
		this.phone=phn;
		this.fax=fax2;
		this.email=email2;
		this.website=website2;
		this.shippingAddress=shpAddr;
		this.invoiceAddr=invAddr;
		this.taxRegrNumber=taxRegdNum;
		this.accCreatedDate=d;
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public Executives getExeId() {
		return exeId;
	}

	public void setExeId(Executives exeId) {
		this.exeId = exeId;
	}

	public String getAccName() {
		return accName;
	}

	public void setAccName(String accName) {
		this.accName = accName;
	}

	public String getAccNumber() {
		return accNumber;
	}

	public void setAccNumber(String accNumber) {
		this.accNumber = accNumber;
	}

	

	public String getIndustryType() {
		return industryType;
	}

	public void setIndustryType(String industryType) {
		this.industryType = industryType;
	}

	public String getPrimaryAccOwnrName() {
		return primaryAccOwnrName;
	}

	public void setPrimaryAccOwnrName(String primaryAccOwnrName) {
		this.primaryAccOwnrName = primaryAccOwnrName;
	}

	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	public String getFax() {
		return fax;
	}

	public void setFax(String fax) {
		this.fax = fax;
	}

	public String getInvoiceAddr() {
		return invoiceAddr;
	}

	public void setInvoiceAddr(String invoiceAddr) {
		this.invoiceAddr = invoiceAddr;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getWebsite() {
		return website;
	}

	public void setWebsite(String website) {
		this.website = website;
	}

	public String getShippingAddress() {
		return shippingAddress;
	}

	public void setShippingAddress(String shippingAddress) {
		this.shippingAddress = shippingAddress;
	}

	public String getTaxRegrNumber() {
		return taxRegrNumber;
	}

	public void setTaxRegrNumber(String taxRegrNumber) {
		this.taxRegrNumber = taxRegrNumber;
	}

	public Date getAccCreatedDate() {
		return accCreatedDate;
	}

	public void setAccCreatedDate(Date accCreatedDate) {
		this.accCreatedDate = accCreatedDate;
	}

	
	
}
